using SqlSugar;
using System;

namespace B.S.XZYData.Domain.ZSH
{
	/// <summary>
	/// 不良品项表
	/// </summary>
	[SugarTable("Defective")]
	public class Defective
	{
        /// <summary>
        /// 主键，唯一标识
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        /// <summary>
        /// 不良品项编号
        /// </summary>
        [SugarColumn( Length = 200)]
		public string DefectiveCode { get; set; }

		/// <summary>
		/// 不良品项名称
		/// </summary>
		[SugarColumn(Length = 200, IsNullable = false)]
		public string DefectiveName { get; set; }

		/// <summary>
		/// 附件路径（可空，存储文件路径）
		/// </summary>
		[SugarColumn(Length = 500, IsNullable = true)]
		public string AttachmentPath { get; set; }

		/// <summary>
		/// 图片路径（可空，存储图片路径）
		/// </summary>
		[SugarColumn(Length = 500, IsNullable = true)]
		public string ImagePath { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(IsNullable = false)]
        public DateTime CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 创建人ID（关联User.Id）
        /// </summary>
        [SugarColumn(IsNullable = false)]
        public int CreatorId { get; set; }

        /// <summary>
        /// 最后修改时间
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public DateTime? ModifyTime { get; set; }

        /// <summary>
        /// 最后修改人ID（关联User.Id）
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int? ModifierId { get; set; }

		/// <summary>
		/// 伪删除标记（false=未删除，true=已删除）
		/// </summary>
		[SugarColumn(IsNullable = false)]
		public bool IsDeleted { get; set; } = false;
    }
}


